namespace Bt.SecuritySystem
{
    using System;
    using Microsoft.SPOT;
    using Microsoft.SPOT.Hardware;
    using SecretLabs.NETMF.Hardware;
    using SecretLabs.NETMF.Hardware.NetduinoPlus;

    public class Buzz 
        : IDisposable
    {
        private PWM beeper = new PWM(Pins.GPIO_PIN_D5);
        
        public void Beep()
        {
            beeper.SetPulse(1000, 100);
            for (int n = 0; n < 2000; n++ )
            {
            }
            beeper.SetPulse(0, 0);
        }
        public void Dispose()
        {
            beeper.Dispose();
            beeper = null;
        }
    }
}